package com.hs.jhzd.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.hs.jhzd.entity.EquipmentModule;

@Repository
public interface EquipmentModuleRepository extends JpaRepository<EquipmentModule, Long> {

	List<EquipmentModule> findByJsbhOrderByCode(String jsbh);

	@Query("select u from EquipmentModule u where u.jsbh = :jsbh and u.visible=1 order by u.code")
	public List<EquipmentModule> findVisibleByJsbh(@Param("jsbh") String jsbh);

}
